﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace cmsni.App_Code
{
    public class cmsnishoppingcart
    {


        public void AddItem(string CartID, int ProdID, int Quantity)
        {

        }



        public void deleteitem(string CartID, int ProdID, int Quantity)
        {

        }

        public void updateitem(string CartID, int ProdID, int Quantity)
        {

        }




        public string GetCartID()
        {
            System.Web.HttpContext context =
                  System.Web.HttpContext.Current;

            if (context.Request.Cookies["cmsnicartid"] != null)
            {
                return context.Request.Cookies["cmsnicartid"].Value;
            }
            else
            {
                Guid tempGuid = Guid.NewGuid();

                context.Response.Cookies["cmsnicartid"].Value
                                             = tempGuid.ToString();

                return tempGuid.ToString();
            }
        }
    }
}